package com.tulingxueyuan.mall.modules.pms.controller;


import com.tulingxueyuan.mall.common.api.CommonResult;
import com.tulingxueyuan.mall.modules.pms.model.PmsProduct;
import com.tulingxueyuan.mall.modules.pms.service.PmsProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商品信息 前端控制器
 * </p>
 *
 * @author swfnotswift
 * @since 2024-04-02
 */
@RestController
@Slf4j
@RequestMapping("/product")
public class PmsProductController {
    @Autowired
    PmsProductService pmsProductService;
    @GetMapping("/list")
    public CommonResult<List<PmsProduct>>list(){
        List<PmsProduct> list = pmsProductService.list();
        log.info(list.toString());
        return CommonResult.success(list);



    }


}

